<?php

class Model_Shuffle extends Model
{
	public function get_data()
	{	
		//connection method
		$link=$this->connect_to_db();
		$shuffle_q = mysqli_query($link, "select * from photos_list order by rand() limit 1;");
		$shuffle = mysqli_fetch_array($shuffle_q,  MYSQLI_ASSOC);
		mysqli_close($link);
		return $shuffle;
	}

}
